1. Field
The present invention relates to an apparatus and method of measuring a distance using structured light, and more particularly, to an apparatus and method of measuring a distance using structured light, in which an input image is binarized, and then an image having connected pixels in the binarized image is identified, and noise is removed using the length ratio of the major axis to the minor axis of the image having connected pixels in the binarized image and the mean of pixel values, thereby improving the accuracy of distance measurement.
2. Description of the Related Art
In order to travel around or perform a job in a place on which preliminary information is insufficient, a mobile robot, such as a cleaning robot or a guide robot, needs to have an ability to autonomously plan a path, detect an obstacle, and avoid collision. To achieve this, an ability to measure a distance to an obstacle, which can be used in order to estimate a position, is essential. Also, an ability to measure a distance to an obstacle is necessary in an intrusion sensing system using an image comparison method.
To measure such distances, a variety of methods using a visual sensor, an ultrasound sensor, or a contact sensor have been used. Among these methods, a method using structured light and a camera is very effective, because the method requires less computation and can be used in a place where a change in brightness is small.
According to this method, as illustrated in FIG. 1A, light is irradiated to an obstacle 30 using an active light source 10, such as a laser, and the image of the reflected light is obtained using a sensor 20, such as a camera. Then, using the image coordinates of the camera 20, the scanning angle of the image at that time, and the distance between the camera 20 and the laser beam emission position, the distance between the position of laser emission and the obstacle 30 where the laser light is reflected can be calculated from the obtained image according to a triangular method using angle θ.
Referring to FIG. 1A, the distance d between the light source 10 and the camera sensor 20 is referred to as a baseline. As this distance increases, the resolution becomes worse. When the height of a robot is limited as is that of a cleaning robot, the baseline distance is short in many cases. In such cases, the range resolution at a distant position becomes worse.
FIG. 2 is a diagram illustrating a range resolution with respect to a distance when the length of a baseline according to a conventional technology is short (for example, 8 cm).
FIG. 2 shows a resolution with respect to a length when the baseline is 8 cm, the vertical pixel of a camera is 480, and the vertical lens angle is 60°, and it can be seen that with increasing distance, the resolution becomes worse. In this case, a peak detection method can be used.
FIG. 3 is a diagram illustrating the distribution of pixel values of pixels arranged along a predetermined vertical line of a camera image. As illustrated in FIG. 3, assuming that the positions and pixel values of points a, b, and c are known and the brightness distribution of an image formed by the pixels arranged along the vertical line forms a parabola, the position of the peak point can be identified using a parabolic interpolation method. The distance to an obstacle can be identified by applying the triangular method described above to the position of the peak point.
However, in actual practice, it is quite difficult to accurately identify the positions of points a, b, and c due to a serious noise caused by reflection of sunrays or other illuminations and laser light.